package com.dapeng.cleardatabackend.service.impl;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;

import static org.junit.jupiter.api.Assertions.*;

/**
 * @author dapeng
 * @description
 * @date 2024/12/23 15:41
 */
@SpringBootTest
class GraphServiceImplTest {

    @Resource
    private GraphServiceImpl graphServiceImpl;

    @Test
    void verifyFile() throws IOException {
        // 本地文件路径
        String filePath = "C:\\Users\\bulingbuling\\Downloads\\relation.csv";

        // 读取本地文件
        File file = new File(filePath);
        FileInputStream fileInputStream = new FileInputStream(file);

        // 创建一个 MockMultipartFile 来模拟上传的文件
        MultipartFile multipartFile = new MockMultipartFile("file", file.getName(), "text/csv", fileInputStream);

    }
}